import httpInstance from "@/utils/http";

/**
 * 获取二级分类列表
 * @param {*} id 
 * @returns 
 */
export function getErCategoryAPI(id) {
    return httpInstance({
        //接口文档没有这个路径。对于视频Day4-02,7分33秒
        url:'/category/sub/filter',
        params:{
            id
        }
    })
}

/**
 * @description: 获取导航数据
 * @data { 
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   } 
 * @return {*}
 */
export const getSubCategoryAPI = (data) => {
  return httpInstance({
    url:'/category/goods/temporary',
    method:'POST',
    data
  })
}